﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<KabiManagementWeb.Models.Admin>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Admin</h2>
        <p>
        <%= Html.ActionLink("+ Tạo tài khoản", "Create") %>
    </p>
    <hr />  
    <table class="tbList" cellpadding="0" cellspacing="0">
        <tr>
            <th>
            </th>
            <th>
                Mã
            </th>
            <th>
                Tên truy cập
            </th>
            <th>
                Mật Khẩu
            </th>
            <th>
                Quyền
            </th>
            <th>
                Tình trạng
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%= Html.ActionLink("Sửa", "Edit", new { id=item.ID }) %>|
                
                <%= Html.ActionLink("Xóa tài khoản", "Delete", new { id=item.ID })%>
            </td>
            <td>
                <%= Html.Encode(item.ID) %>
            </td>
            <td>
                <%= Html.Encode(item.UserName) %>
            </td>
            <td>
                <%= Html.Encode(item.Pass) %>
            </td>
            <td>
                <%= Html.Encode(item.Role.F_Name) %>
            </td>
            <td>
                <%= Html.Encode(item.Status) %>
            </td>
        </tr>
        <% } %>
    </table>
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptZone" runat="server">
</asp:Content>
